package user.controller;

import java.io.PrintWriter;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import org.springframework.web.servlet.view.AbstractView;

public class JSONViewDouble extends AbstractView {
	public JSONViewDouble(){
	super();
	  setContentType("text/html;charset=euc-kr"); 
    }
	@Override
	protected void renderMergedOutputModel(Map<String, Object> model,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		//System.out.println("111");
		String json = (String)model.get("filedouble");// yes, no
		//System.out.println(json);
		/*String json="";
		JSONObject obj=new JSONObject();
		//JSONArray arr=new JSONArray();
		obj.put("filedouble",1);
		json=obj.toString();*/
		response.setContentType( "text/html; charset=euc-kr");   
		response.setHeader("Cache-Control", "no-cache"); 
		PrintWriter out = response.getWriter();   
		out.write(json);		
		out.flush();
		out.close();
		} 
	}

